import 'dart:convert';
/// code : 0
/// message : "操作成功"
/// data : {"user":{"id":6,"account":"zs","phone":"13167782030","name":null,"password":"","avatar":null,"isVip":false,"vipExpired":null,"createTime":"2023-12-27 16:58:22","isDelete":false},"token":"Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiY3JlYXRlZCI6MTcwMzY2NzUwMjIzNX0.ahhZpzUI82RFUccVIkjMmZEuGd9-AmE7burmQXL91Zui6meD-3IaWXc5878yeuA2AnUZfIgxYu-4z7qq-sgwgw"}

LoginResp loginRespFromJson(String str) => LoginResp.fromJson(json.decode(str));
String loginRespToJson(LoginResp data) => json.encode(data.toJson());
class LoginResp {
  LoginResp({
      this.code, 
      this.message, 
      this.data,});

  LoginResp.fromJson(dynamic json) {
    code = json['code'];
    message = json['message'];
    data = json['data'] != null ? LoginData.fromJson(json['data']) : null;
  }
  num? code;
  String? message;
  LoginData? data;
LoginResp copyWith({  num? code,
  String? message,
  LoginData? data,
}) => LoginResp(  code: code ?? this.code,
  message: message ?? this.message,
  data: data ?? this.data,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['code'] = code;
    map['message'] = message;
    if (data != null) {
      map['data'] = data?.toJson();
    }
    return map;
  }

}

/// user : {"id":6,"account":"zs","phone":"13167782030","name":null,"password":"","avatar":null,"isVip":false,"vipExpired":null,"createTime":"2023-12-27 16:58:22","isDelete":false}
/// token : "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiY3JlYXRlZCI6MTcwMzY2NzUwMjIzNX0.ahhZpzUI82RFUccVIkjMmZEuGd9-AmE7burmQXL91Zui6meD-3IaWXc5878yeuA2AnUZfIgxYu-4z7qq-sgwgw"

LoginData dataFromJson(String str) => LoginData.fromJson(json.decode(str));
String dataToJson(LoginData data) => json.encode(data.toJson());
class LoginData {
  LoginData({
      this.user, 
      this.token,});

  LoginData.fromJson(dynamic json) {
    user = json['user'] != null ? User.fromJson(json['user']) : null;
    token = json['token'];
  }
  User? user;
  String? token;
LoginData copyWith({  User? user,
  String? token,
}) => LoginData(  user: user ?? this.user,
  token: token ?? this.token,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (user != null) {
      map['user'] = user?.toJson();
    }
    map['token'] = token;
    return map;
  }

}

/// id : 6
/// account : "zs"
/// phone : "13167782030"
/// name : null
/// password : ""
/// avatar : null
/// isVip : false
/// vipExpired : null
/// createTime : "2023-12-27 16:58:22"
/// isDelete : false

User userFromJson(String str) => User.fromJson(json.decode(str));
String userToJson(User data) => json.encode(data.toJson());
class User {
  User({
      this.id, 
      this.account, 
      this.phone, 
      this.name, 
      this.password, 
      this.avatar, 
      this.isVip, 
      this.vipExpired, 
      this.createTime, 
      this.isDelete,});

  User.fromJson(dynamic json) {
    id = json['id'];
    account = json['account'];
    phone = json['phone'];
    name = json['name'];
    password = json['password'];
    avatar = json['avatar'];
    isVip = json['isVip'];
    vipExpired = json['vipExpired'];
    createTime = json['createTime'];
    isDelete = json['isDelete'];
  }
  num? id;
  String? account;
  String? phone;
  String? name;
  String? password;
  String? avatar;
  bool? isVip;
  bool? vipExpired;
  String? createTime;
  bool? isDelete;
User copyWith({  num? id,
  String? account,
  String? phone,
  String? name,
  String? password,
  String? avatar,
  bool? isVip,
  bool? vipExpired,
  String? createTime,
  bool? isDelete,
}) => User(  id: id ?? this.id,
  account: account ?? this.account,
  phone: phone ?? this.phone,
  name: name ?? this.name,
  password: password ?? this.password,
  avatar: avatar ?? this.avatar,
  isVip: isVip ?? this.isVip,
  vipExpired: vipExpired ?? this.vipExpired,
  createTime: createTime ?? this.createTime,
  isDelete: isDelete ?? this.isDelete,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['account'] = account;
    map['phone'] = phone;
    map['name'] = name;
    map['password'] = password;
    map['avatar'] = avatar;
    map['isVip'] = isVip;
    map['vipExpired'] = vipExpired;
    map['createTime'] = createTime;
    map['isDelete'] = isDelete;
    return map;
  }

}